//An example on how to use a method as an pseudo object. This feature is for 
//more advance users. If you do not know how to use this feature properly 
//your code will blow up...


sub Main()
	dim name as string,lname as string
	dim age as integer
	
	name = "Jose"
	lname = "Cuevas"

	//The magic here is that a method's variables and parameters
	//are exposed as object members. They are static in nature.
	myMethod.name = name
	myMethod.lname = lname
	
	//We do not need to provide any parameter because we have
	//already setup the values needed in the two statements above.
	//Now all parameters are optional and therefore you must be sure 
	//that all the methods variables have a valid value or else it
	//will explode or cause a weird behavior not intended.
	myMethod()
	
	//Here we access variables of the method like object properties
	//notice that we can access any variable defined inside the method.
	
	msgbox("Fullname2: " & myMethod.name & " " & myMethod.lname)	
	msgbox("Fullname3: " & myMethod.fullname)
	
	//Lets call it in a more traditional fashion
	myMethod("Joe","Cuevas")
	
	//Lets see what we mean with static variables
	myMethod()
end sub

sub myMethod(optional name as string, optional lname as string)
	dim fullname as string

	//Word of caution: since varaibles are now static, you have to make sure
	//they have a valid value before using them. You have to initialize
	//variables as required.
	
	fullname = name & " " & lname
	msgbox("Fullname1: " & fullname)
end sub